<extend name="Include:Layout"/>
<block name="title">自定义介绍</block>
<block name="style">

</block>

<block name="main">
	<div class="weui_tab">
		<div class="weui_navbar">
			<div class="toolbar">
		        <div class="toolbar-inner">
		            <a href="javascript:history.go(-1);" class="picker-button close-popup">返回</a>
		             <h1 class="title" id="banji_title">自定义支付</h1> 
		        </div>
		    </div>
		</div>
		<div class="weui_tab_bd container" id="container" style="padding-top:44px;">
			<div class="weui_cells weui_cells_form" style="margin-top:10px;">
				<div class="weui_cell banjiDom">
				    <div class="weui_cell_hd"><label class="weui_label">订单信息</label></div>
				    <div class="weui_cell_bd weui_cell_primary">
				    	{$info.objectinfo}
				    </div>
				  </div>
				<div class="weui_cell">
			     <div class="weui_cell_hd"><label class="weui_label">金额</label></div>
			     <div class="weui_cell_bd weui_cell_primary">
			       {$info.total}
			     </div>
			    </div>
			</div>
			<div style="padding:15px;">
				<button class="weui_btn weui_btn_primary weixinPayBtn" data-order_id="{$_GET['id']}">支付</button>
			</div>
		</div>
	</div>
	<input type="hidden" name="uid" value="{$_SESSION['_loginUser_home']['uid']}"/>
</block>

<block name="script">
<js href="/Public/Static/weixin_pay.js"/>
<script>
//$(".weixinPayBtn").on('click',function(){
//	callpay();
//})
//function jsApiCall(){
//	WeixinJSBridge.invoke(
//		'getBrandWCPayRequest',
//		<?php echo $jsApiParameters; ?>,
//		function(res){
//			//如果支付成功
//			if (res.err_msg == 'get_brand_wcpay_request:ok') {
//				$.alert('支付成功', function(){
//					location.href='/home/freepay/index';
//		        });
//			}else if (res.err_msg == 'get_brand_wcpay_request:cancel') {
//				$.toast('请尽快完成支付哦！','text');
//			}else if (res.err_msg == 'get_brand_wcpay_request:fail') {
//				$.toast('支付失败','text');
//			}else {
//				$.toast('意外错误','text');
//			}
//		}
//	);
//}
//function callpay(){
//	if (typeof WeixinJSBridge == "undefined"){
//	    if( document.addEventListener ){
//	        document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
//	    }else if (document.attachEvent){
//	        document.attachEvent('WeixinJSBridgeReady', jsApiCall); 
//	        document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
//	    }
//	}else{
//	    jsApiCall();
//	}
//}
</script>
</block>